
/**
 * This is a generated class and is not intended for modification.  
 */
package valueObjects
{
import com.adobe.fiber.styles.IStyle;
import com.adobe.fiber.styles.Style;
import com.adobe.fiber.styles.StyleValidator;
import com.adobe.fiber.valueobjects.AbstractEntityMetadata;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import mx.events.ValidationResultEvent;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IModelType;
import mx.events.PropertyChangeEvent;

use namespace model_internal;

[ExcludeClass]
internal class _PatientGeneralInfoEntityMetadata extends com.adobe.fiber.valueobjects.AbstractEntityMetadata
{
    private static var emptyArray:Array = new Array();

    model_internal static var allProperties:Array = new Array("addressLine1", "addressLine2", "birthCountry", "city", "dateOfBirth", "email", "ethnicity", "firstName", "homePhone", "id", "lastName", "middleName", "password", "personalInfo", "sex", "ssn", "state", "username", "workPhone", "zip");
    model_internal static var allAssociationProperties:Array = new Array();
    model_internal static var allRequiredProperties:Array = new Array("addressLine1", "addressLine2", "birthCountry", "city", "dateOfBirth", "email", "ethnicity", "firstName", "homePhone", "id", "lastName", "middleName", "password", "personalInfo", "sex", "ssn", "state", "username", "workPhone", "zip");
    model_internal static var allAlwaysAvailableProperties:Array = new Array("addressLine1", "addressLine2", "birthCountry", "city", "dateOfBirth", "email", "ethnicity", "firstName", "homePhone", "id", "lastName", "middleName", "password", "personalInfo", "sex", "ssn", "state", "username", "workPhone", "zip");
    model_internal static var guardedProperties:Array = new Array();
    model_internal static var dataProperties:Array = new Array("addressLine1", "addressLine2", "birthCountry", "city", "dateOfBirth", "email", "ethnicity", "firstName", "homePhone", "id", "lastName", "middleName", "password", "personalInfo", "sex", "ssn", "state", "username", "workPhone", "zip");
    model_internal static var derivedProperties:Array = new Array();
    model_internal static var collectionProperties:Array = new Array();
    model_internal static var collectionBaseMap:Object;
    model_internal static var entityName:String = "PatientGeneralInfo";
    model_internal static var dependentsOnMap:Object;
    model_internal static var dependedOnServices:Array = new Array();

    
    model_internal var _addressLine1IsValid:Boolean;
    model_internal var _addressLine1Validator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _addressLine1IsValidCacheInitialized:Boolean = false;
    model_internal var _addressLine1ValidationFailureMessages:Array;
    
    model_internal var _addressLine2IsValid:Boolean;
    model_internal var _addressLine2Validator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _addressLine2IsValidCacheInitialized:Boolean = false;
    model_internal var _addressLine2ValidationFailureMessages:Array;
    
    model_internal var _birthCountryIsValid:Boolean;
    model_internal var _birthCountryValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _birthCountryIsValidCacheInitialized:Boolean = false;
    model_internal var _birthCountryValidationFailureMessages:Array;
    
    model_internal var _cityIsValid:Boolean;
    model_internal var _cityValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _cityIsValidCacheInitialized:Boolean = false;
    model_internal var _cityValidationFailureMessages:Array;
    
    model_internal var _dateOfBirthIsValid:Boolean;
    model_internal var _dateOfBirthValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _dateOfBirthIsValidCacheInitialized:Boolean = false;
    model_internal var _dateOfBirthValidationFailureMessages:Array;
    
    model_internal var _emailIsValid:Boolean;
    model_internal var _emailValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _emailIsValidCacheInitialized:Boolean = false;
    model_internal var _emailValidationFailureMessages:Array;
    
    model_internal var _ethnicityIsValid:Boolean;
    model_internal var _ethnicityValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _ethnicityIsValidCacheInitialized:Boolean = false;
    model_internal var _ethnicityValidationFailureMessages:Array;
    
    model_internal var _firstNameIsValid:Boolean;
    model_internal var _firstNameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _firstNameIsValidCacheInitialized:Boolean = false;
    model_internal var _firstNameValidationFailureMessages:Array;
    
    model_internal var _homePhoneIsValid:Boolean;
    model_internal var _homePhoneValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _homePhoneIsValidCacheInitialized:Boolean = false;
    model_internal var _homePhoneValidationFailureMessages:Array;
    
    model_internal var _lastNameIsValid:Boolean;
    model_internal var _lastNameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _lastNameIsValidCacheInitialized:Boolean = false;
    model_internal var _lastNameValidationFailureMessages:Array;
    
    model_internal var _middleNameIsValid:Boolean;
    model_internal var _middleNameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _middleNameIsValidCacheInitialized:Boolean = false;
    model_internal var _middleNameValidationFailureMessages:Array;
    
    model_internal var _passwordIsValid:Boolean;
    model_internal var _passwordValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _passwordIsValidCacheInitialized:Boolean = false;
    model_internal var _passwordValidationFailureMessages:Array;
    
    model_internal var _personalInfoIsValid:Boolean;
    model_internal var _personalInfoValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _personalInfoIsValidCacheInitialized:Boolean = false;
    model_internal var _personalInfoValidationFailureMessages:Array;
    
    model_internal var _sexIsValid:Boolean;
    model_internal var _sexValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _sexIsValidCacheInitialized:Boolean = false;
    model_internal var _sexValidationFailureMessages:Array;
    
    model_internal var _ssnIsValid:Boolean;
    model_internal var _ssnValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _ssnIsValidCacheInitialized:Boolean = false;
    model_internal var _ssnValidationFailureMessages:Array;
    
    model_internal var _stateIsValid:Boolean;
    model_internal var _stateValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _stateIsValidCacheInitialized:Boolean = false;
    model_internal var _stateValidationFailureMessages:Array;
    
    model_internal var _usernameIsValid:Boolean;
    model_internal var _usernameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _usernameIsValidCacheInitialized:Boolean = false;
    model_internal var _usernameValidationFailureMessages:Array;
    
    model_internal var _workPhoneIsValid:Boolean;
    model_internal var _workPhoneValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _workPhoneIsValidCacheInitialized:Boolean = false;
    model_internal var _workPhoneValidationFailureMessages:Array;

    model_internal var _instance:_Super_PatientGeneralInfo;
    model_internal static var _nullStyle:com.adobe.fiber.styles.Style = new com.adobe.fiber.styles.Style();

    public function _PatientGeneralInfoEntityMetadata(value : _Super_PatientGeneralInfo)
    {
        // initialize property maps
        if (model_internal::dependentsOnMap == null)
        {
            // depenents map
            model_internal::dependentsOnMap = new Object();
            model_internal::dependentsOnMap["addressLine1"] = new Array();
            model_internal::dependentsOnMap["addressLine2"] = new Array();
            model_internal::dependentsOnMap["birthCountry"] = new Array();
            model_internal::dependentsOnMap["city"] = new Array();
            model_internal::dependentsOnMap["dateOfBirth"] = new Array();
            model_internal::dependentsOnMap["email"] = new Array();
            model_internal::dependentsOnMap["ethnicity"] = new Array();
            model_internal::dependentsOnMap["firstName"] = new Array();
            model_internal::dependentsOnMap["homePhone"] = new Array();
            model_internal::dependentsOnMap["id"] = new Array();
            model_internal::dependentsOnMap["lastName"] = new Array();
            model_internal::dependentsOnMap["middleName"] = new Array();
            model_internal::dependentsOnMap["password"] = new Array();
            model_internal::dependentsOnMap["personalInfo"] = new Array();
            model_internal::dependentsOnMap["sex"] = new Array();
            model_internal::dependentsOnMap["ssn"] = new Array();
            model_internal::dependentsOnMap["state"] = new Array();
            model_internal::dependentsOnMap["username"] = new Array();
            model_internal::dependentsOnMap["workPhone"] = new Array();
            model_internal::dependentsOnMap["zip"] = new Array();

            // collection base map
            model_internal::collectionBaseMap = new Object()
        }

        model_internal::_instance = value;
        model_internal::_addressLine1Validator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForAddressLine1);
        model_internal::_addressLine1Validator.required = true;
        model_internal::_addressLine1Validator.requiredFieldError = "addressLine1 is required";
        //model_internal::_addressLine1Validator.source = model_internal::_instance;
        //model_internal::_addressLine1Validator.property = "addressLine1";
        model_internal::_addressLine2Validator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForAddressLine2);
        model_internal::_addressLine2Validator.required = true;
        model_internal::_addressLine2Validator.requiredFieldError = "addressLine2 is required";
        //model_internal::_addressLine2Validator.source = model_internal::_instance;
        //model_internal::_addressLine2Validator.property = "addressLine2";
        model_internal::_birthCountryValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForBirthCountry);
        model_internal::_birthCountryValidator.required = true;
        model_internal::_birthCountryValidator.requiredFieldError = "birthCountry is required";
        //model_internal::_birthCountryValidator.source = model_internal::_instance;
        //model_internal::_birthCountryValidator.property = "birthCountry";
        model_internal::_cityValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForCity);
        model_internal::_cityValidator.required = true;
        model_internal::_cityValidator.requiredFieldError = "city is required";
        //model_internal::_cityValidator.source = model_internal::_instance;
        //model_internal::_cityValidator.property = "city";
        model_internal::_dateOfBirthValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForDateOfBirth);
        model_internal::_dateOfBirthValidator.required = true;
        model_internal::_dateOfBirthValidator.requiredFieldError = "dateOfBirth is required";
        //model_internal::_dateOfBirthValidator.source = model_internal::_instance;
        //model_internal::_dateOfBirthValidator.property = "dateOfBirth";
        model_internal::_emailValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForEmail);
        model_internal::_emailValidator.required = true;
        model_internal::_emailValidator.requiredFieldError = "email is required";
        //model_internal::_emailValidator.source = model_internal::_instance;
        //model_internal::_emailValidator.property = "email";
        model_internal::_ethnicityValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForEthnicity);
        model_internal::_ethnicityValidator.required = true;
        model_internal::_ethnicityValidator.requiredFieldError = "ethnicity is required";
        //model_internal::_ethnicityValidator.source = model_internal::_instance;
        //model_internal::_ethnicityValidator.property = "ethnicity";
        model_internal::_firstNameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForFirstName);
        model_internal::_firstNameValidator.required = true;
        model_internal::_firstNameValidator.requiredFieldError = "firstName is required";
        //model_internal::_firstNameValidator.source = model_internal::_instance;
        //model_internal::_firstNameValidator.property = "firstName";
        model_internal::_homePhoneValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForHomePhone);
        model_internal::_homePhoneValidator.required = true;
        model_internal::_homePhoneValidator.requiredFieldError = "homePhone is required";
        //model_internal::_homePhoneValidator.source = model_internal::_instance;
        //model_internal::_homePhoneValidator.property = "homePhone";
        model_internal::_lastNameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForLastName);
        model_internal::_lastNameValidator.required = true;
        model_internal::_lastNameValidator.requiredFieldError = "lastName is required";
        //model_internal::_lastNameValidator.source = model_internal::_instance;
        //model_internal::_lastNameValidator.property = "lastName";
        model_internal::_middleNameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForMiddleName);
        model_internal::_middleNameValidator.required = true;
        model_internal::_middleNameValidator.requiredFieldError = "middleName is required";
        //model_internal::_middleNameValidator.source = model_internal::_instance;
        //model_internal::_middleNameValidator.property = "middleName";
        model_internal::_passwordValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPassword);
        model_internal::_passwordValidator.required = true;
        model_internal::_passwordValidator.requiredFieldError = "password is required";
        //model_internal::_passwordValidator.source = model_internal::_instance;
        //model_internal::_passwordValidator.property = "password";
        model_internal::_personalInfoValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPersonalInfo);
        model_internal::_personalInfoValidator.required = true;
        model_internal::_personalInfoValidator.requiredFieldError = "personalInfo is required";
        //model_internal::_personalInfoValidator.source = model_internal::_instance;
        //model_internal::_personalInfoValidator.property = "personalInfo";
        model_internal::_sexValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForSex);
        model_internal::_sexValidator.required = true;
        model_internal::_sexValidator.requiredFieldError = "sex is required";
        //model_internal::_sexValidator.source = model_internal::_instance;
        //model_internal::_sexValidator.property = "sex";
        model_internal::_ssnValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForSsn);
        model_internal::_ssnValidator.required = true;
        model_internal::_ssnValidator.requiredFieldError = "ssn is required";
        //model_internal::_ssnValidator.source = model_internal::_instance;
        //model_internal::_ssnValidator.property = "ssn";
        model_internal::_stateValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForState);
        model_internal::_stateValidator.required = true;
        model_internal::_stateValidator.requiredFieldError = "state is required";
        //model_internal::_stateValidator.source = model_internal::_instance;
        //model_internal::_stateValidator.property = "state";
        model_internal::_usernameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForUsername);
        model_internal::_usernameValidator.required = true;
        model_internal::_usernameValidator.requiredFieldError = "username is required";
        //model_internal::_usernameValidator.source = model_internal::_instance;
        //model_internal::_usernameValidator.property = "username";
        model_internal::_workPhoneValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForWorkPhone);
        model_internal::_workPhoneValidator.required = true;
        model_internal::_workPhoneValidator.requiredFieldError = "workPhone is required";
        //model_internal::_workPhoneValidator.source = model_internal::_instance;
        //model_internal::_workPhoneValidator.property = "workPhone";
    }

    override public function getEntityName():String
    {
        return model_internal::entityName;
    }

    override public function getProperties():Array
    {
        return model_internal::allProperties;
    }

    override public function getAssociationProperties():Array
    {
        return model_internal::allAssociationProperties;
    }

    override public function getRequiredProperties():Array
    {
         return model_internal::allRequiredProperties;   
    }

    override public function getDataProperties():Array
    {
        return model_internal::dataProperties;
    }

    override public function getGuardedProperties():Array
    {
        return model_internal::guardedProperties;
    }

    override public function getUnguardedProperties():Array
    {
        return model_internal::allAlwaysAvailableProperties;
    }

    override public function getDependants(propertyName:String):Array
    {
       if (model_internal::dataProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a data property of entity PatientGeneralInfo");  
            
       return model_internal::dependentsOnMap[propertyName] as Array;  
    }

    override public function getDependedOnServices():Array
    {
        return model_internal::dependedOnServices;
    }

    override public function getCollectionProperties():Array
    {
        return model_internal::collectionProperties;
    }

    override public function getCollectionBase(propertyName:String):String
    {
        if (model_internal::collectionProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a collection property of entity PatientGeneralInfo");  

        return model_internal::collectionBaseMap[propertyName];
    }

    override public function getAvailableProperties():com.adobe.fiber.valueobjects.IPropertyIterator
    {
        return new com.adobe.fiber.valueobjects.AvailablePropertyIterator(this);
    }

    override public function getValue(propertyName:String):*
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity PatientGeneralInfo");
        }

        return model_internal::_instance[propertyName];
    }

    override public function setValue(propertyName:String, value:*):void
    {
        if (model_internal::dataProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " is not a data property of entity PatientGeneralInfo");
        }

        model_internal::_instance[propertyName] = value;
    }

    override public function getMappedByProperty(associationProperty:String):String
    {
        switch(associationProperty)
        {
            default:
            {
                return null;
            }
        }
    }

    override public function getPropertyLength(propertyName:String):int
    {
        switch(propertyName)
        {
            default:
            {
                return 0;
            }
        }
    }

    override public function isAvailable(propertyName:String):Boolean
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity PatientGeneralInfo");
        }

        if (model_internal::allAlwaysAvailableProperties.indexOf(propertyName) != -1)
        {
            return true;
        }

        switch(propertyName)
        {
            default:
            {
                return true;
            }
        }
    }

    override public function getIdentityMap():Object
    {
        var returnMap:Object = new Object();

        return returnMap;
    }

    [Bindable(event="propertyChange")]
    override public function get invalidConstraints():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_invalidConstraints;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_invalidConstraints;        
        }
    }

    [Bindable(event="propertyChange")]
    override public function get validationFailureMessages():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
    }

    override public function getDependantInvalidConstraints(propertyName:String):Array
    {
        var dependants:Array = getDependants(propertyName);
        if (dependants.length == 0)
        {
            return emptyArray;
        }

        var currentlyInvalid:Array = invalidConstraints;
        if (currentlyInvalid.length == 0)
        {
            return emptyArray;
        }

        var filterFunc:Function = function(element:*, index:int, arr:Array):Boolean
        {
            return dependants.indexOf(element) > -1;
        }

        return currentlyInvalid.filter(filterFunc);
    }

    /**
     * isValid
     */
    [Bindable(event="propertyChange")] 
    public function get isValid() : Boolean
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_isValid;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_isValid;
        }
    }

    [Bindable(event="propertyChange")]
    public function get isAddressLine1Available():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isAddressLine2Available():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isBirthCountryAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCityAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isDateOfBirthAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isEmailAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isEthnicityAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isFirstNameAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isHomePhoneAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isIdAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isLastNameAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isMiddleNameAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPasswordAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPersonalInfoAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isSexAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isSsnAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isStateAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isUsernameAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isWorkPhoneAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isZipAvailable():Boolean
    {
        return true;
    }


    /**
     * derived property recalculation
     */
    public function invalidateDependentOnAddressLine1():void
    {
        if (model_internal::_addressLine1IsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfAddressLine1 = null;
            model_internal::calculateAddressLine1IsValid();
        }
    }
    public function invalidateDependentOnAddressLine2():void
    {
        if (model_internal::_addressLine2IsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfAddressLine2 = null;
            model_internal::calculateAddressLine2IsValid();
        }
    }
    public function invalidateDependentOnBirthCountry():void
    {
        if (model_internal::_birthCountryIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfBirthCountry = null;
            model_internal::calculateBirthCountryIsValid();
        }
    }
    public function invalidateDependentOnCity():void
    {
        if (model_internal::_cityIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfCity = null;
            model_internal::calculateCityIsValid();
        }
    }
    public function invalidateDependentOnDateOfBirth():void
    {
        if (model_internal::_dateOfBirthIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfDateOfBirth = null;
            model_internal::calculateDateOfBirthIsValid();
        }
    }
    public function invalidateDependentOnEmail():void
    {
        if (model_internal::_emailIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfEmail = null;
            model_internal::calculateEmailIsValid();
        }
    }
    public function invalidateDependentOnEthnicity():void
    {
        if (model_internal::_ethnicityIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfEthnicity = null;
            model_internal::calculateEthnicityIsValid();
        }
    }
    public function invalidateDependentOnFirstName():void
    {
        if (model_internal::_firstNameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfFirstName = null;
            model_internal::calculateFirstNameIsValid();
        }
    }
    public function invalidateDependentOnHomePhone():void
    {
        if (model_internal::_homePhoneIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfHomePhone = null;
            model_internal::calculateHomePhoneIsValid();
        }
    }
    public function invalidateDependentOnLastName():void
    {
        if (model_internal::_lastNameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfLastName = null;
            model_internal::calculateLastNameIsValid();
        }
    }
    public function invalidateDependentOnMiddleName():void
    {
        if (model_internal::_middleNameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfMiddleName = null;
            model_internal::calculateMiddleNameIsValid();
        }
    }
    public function invalidateDependentOnPassword():void
    {
        if (model_internal::_passwordIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPassword = null;
            model_internal::calculatePasswordIsValid();
        }
    }
    public function invalidateDependentOnPersonalInfo():void
    {
        if (model_internal::_personalInfoIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPersonalInfo = null;
            model_internal::calculatePersonalInfoIsValid();
        }
    }
    public function invalidateDependentOnSex():void
    {
        if (model_internal::_sexIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfSex = null;
            model_internal::calculateSexIsValid();
        }
    }
    public function invalidateDependentOnSsn():void
    {
        if (model_internal::_ssnIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfSsn = null;
            model_internal::calculateSsnIsValid();
        }
    }
    public function invalidateDependentOnState():void
    {
        if (model_internal::_stateIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfState = null;
            model_internal::calculateStateIsValid();
        }
    }
    public function invalidateDependentOnUsername():void
    {
        if (model_internal::_usernameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfUsername = null;
            model_internal::calculateUsernameIsValid();
        }
    }
    public function invalidateDependentOnWorkPhone():void
    {
        if (model_internal::_workPhoneIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfWorkPhone = null;
            model_internal::calculateWorkPhoneIsValid();
        }
    }

    model_internal function fireChangeEvent(propertyName:String, oldValue:Object, newValue:Object):void
    {
        this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, propertyName, oldValue, newValue));
    }

    [Bindable(event="propertyChange")]   
    public function get addressLine1Style():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get addressLine1Validator() : StyleValidator
    {
        return model_internal::_addressLine1Validator;
    }

    model_internal function set _addressLine1IsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_addressLine1IsValid;         
        if (oldValue !== value)
        {
            model_internal::_addressLine1IsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "addressLine1IsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get addressLine1IsValid():Boolean
    {
        if (!model_internal::_addressLine1IsValidCacheInitialized)
        {
            model_internal::calculateAddressLine1IsValid();
        }

        return model_internal::_addressLine1IsValid;
    }

    model_internal function calculateAddressLine1IsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_addressLine1Validator.validate(model_internal::_instance.addressLine1)
        model_internal::_addressLine1IsValid_der = (valRes.results == null);
        model_internal::_addressLine1IsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::addressLine1ValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::addressLine1ValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get addressLine1ValidationFailureMessages():Array
    {
        if (model_internal::_addressLine1ValidationFailureMessages == null)
            model_internal::calculateAddressLine1IsValid();

        return _addressLine1ValidationFailureMessages;
    }

    model_internal function set addressLine1ValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_addressLine1ValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_addressLine1ValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "addressLine1ValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get addressLine2Style():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get addressLine2Validator() : StyleValidator
    {
        return model_internal::_addressLine2Validator;
    }

    model_internal function set _addressLine2IsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_addressLine2IsValid;         
        if (oldValue !== value)
        {
            model_internal::_addressLine2IsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "addressLine2IsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get addressLine2IsValid():Boolean
    {
        if (!model_internal::_addressLine2IsValidCacheInitialized)
        {
            model_internal::calculateAddressLine2IsValid();
        }

        return model_internal::_addressLine2IsValid;
    }

    model_internal function calculateAddressLine2IsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_addressLine2Validator.validate(model_internal::_instance.addressLine2)
        model_internal::_addressLine2IsValid_der = (valRes.results == null);
        model_internal::_addressLine2IsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::addressLine2ValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::addressLine2ValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get addressLine2ValidationFailureMessages():Array
    {
        if (model_internal::_addressLine2ValidationFailureMessages == null)
            model_internal::calculateAddressLine2IsValid();

        return _addressLine2ValidationFailureMessages;
    }

    model_internal function set addressLine2ValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_addressLine2ValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_addressLine2ValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "addressLine2ValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get birthCountryStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get birthCountryValidator() : StyleValidator
    {
        return model_internal::_birthCountryValidator;
    }

    model_internal function set _birthCountryIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_birthCountryIsValid;         
        if (oldValue !== value)
        {
            model_internal::_birthCountryIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "birthCountryIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get birthCountryIsValid():Boolean
    {
        if (!model_internal::_birthCountryIsValidCacheInitialized)
        {
            model_internal::calculateBirthCountryIsValid();
        }

        return model_internal::_birthCountryIsValid;
    }

    model_internal function calculateBirthCountryIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_birthCountryValidator.validate(model_internal::_instance.birthCountry)
        model_internal::_birthCountryIsValid_der = (valRes.results == null);
        model_internal::_birthCountryIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::birthCountryValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::birthCountryValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get birthCountryValidationFailureMessages():Array
    {
        if (model_internal::_birthCountryValidationFailureMessages == null)
            model_internal::calculateBirthCountryIsValid();

        return _birthCountryValidationFailureMessages;
    }

    model_internal function set birthCountryValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_birthCountryValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_birthCountryValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "birthCountryValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get cityStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get cityValidator() : StyleValidator
    {
        return model_internal::_cityValidator;
    }

    model_internal function set _cityIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_cityIsValid;         
        if (oldValue !== value)
        {
            model_internal::_cityIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cityIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get cityIsValid():Boolean
    {
        if (!model_internal::_cityIsValidCacheInitialized)
        {
            model_internal::calculateCityIsValid();
        }

        return model_internal::_cityIsValid;
    }

    model_internal function calculateCityIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_cityValidator.validate(model_internal::_instance.city)
        model_internal::_cityIsValid_der = (valRes.results == null);
        model_internal::_cityIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::cityValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::cityValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get cityValidationFailureMessages():Array
    {
        if (model_internal::_cityValidationFailureMessages == null)
            model_internal::calculateCityIsValid();

        return _cityValidationFailureMessages;
    }

    model_internal function set cityValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_cityValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_cityValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cityValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get dateOfBirthStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get dateOfBirthValidator() : StyleValidator
    {
        return model_internal::_dateOfBirthValidator;
    }

    model_internal function set _dateOfBirthIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_dateOfBirthIsValid;         
        if (oldValue !== value)
        {
            model_internal::_dateOfBirthIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "dateOfBirthIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get dateOfBirthIsValid():Boolean
    {
        if (!model_internal::_dateOfBirthIsValidCacheInitialized)
        {
            model_internal::calculateDateOfBirthIsValid();
        }

        return model_internal::_dateOfBirthIsValid;
    }

    model_internal function calculateDateOfBirthIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_dateOfBirthValidator.validate(model_internal::_instance.dateOfBirth)
        model_internal::_dateOfBirthIsValid_der = (valRes.results == null);
        model_internal::_dateOfBirthIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::dateOfBirthValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::dateOfBirthValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get dateOfBirthValidationFailureMessages():Array
    {
        if (model_internal::_dateOfBirthValidationFailureMessages == null)
            model_internal::calculateDateOfBirthIsValid();

        return _dateOfBirthValidationFailureMessages;
    }

    model_internal function set dateOfBirthValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_dateOfBirthValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_dateOfBirthValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "dateOfBirthValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get emailStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get emailValidator() : StyleValidator
    {
        return model_internal::_emailValidator;
    }

    model_internal function set _emailIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_emailIsValid;         
        if (oldValue !== value)
        {
            model_internal::_emailIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "emailIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get emailIsValid():Boolean
    {
        if (!model_internal::_emailIsValidCacheInitialized)
        {
            model_internal::calculateEmailIsValid();
        }

        return model_internal::_emailIsValid;
    }

    model_internal function calculateEmailIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_emailValidator.validate(model_internal::_instance.email)
        model_internal::_emailIsValid_der = (valRes.results == null);
        model_internal::_emailIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::emailValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::emailValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get emailValidationFailureMessages():Array
    {
        if (model_internal::_emailValidationFailureMessages == null)
            model_internal::calculateEmailIsValid();

        return _emailValidationFailureMessages;
    }

    model_internal function set emailValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_emailValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_emailValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "emailValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get ethnicityStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get ethnicityValidator() : StyleValidator
    {
        return model_internal::_ethnicityValidator;
    }

    model_internal function set _ethnicityIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_ethnicityIsValid;         
        if (oldValue !== value)
        {
            model_internal::_ethnicityIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "ethnicityIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get ethnicityIsValid():Boolean
    {
        if (!model_internal::_ethnicityIsValidCacheInitialized)
        {
            model_internal::calculateEthnicityIsValid();
        }

        return model_internal::_ethnicityIsValid;
    }

    model_internal function calculateEthnicityIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_ethnicityValidator.validate(model_internal::_instance.ethnicity)
        model_internal::_ethnicityIsValid_der = (valRes.results == null);
        model_internal::_ethnicityIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::ethnicityValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::ethnicityValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get ethnicityValidationFailureMessages():Array
    {
        if (model_internal::_ethnicityValidationFailureMessages == null)
            model_internal::calculateEthnicityIsValid();

        return _ethnicityValidationFailureMessages;
    }

    model_internal function set ethnicityValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_ethnicityValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_ethnicityValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "ethnicityValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get firstNameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get firstNameValidator() : StyleValidator
    {
        return model_internal::_firstNameValidator;
    }

    model_internal function set _firstNameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_firstNameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_firstNameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "firstNameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get firstNameIsValid():Boolean
    {
        if (!model_internal::_firstNameIsValidCacheInitialized)
        {
            model_internal::calculateFirstNameIsValid();
        }

        return model_internal::_firstNameIsValid;
    }

    model_internal function calculateFirstNameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_firstNameValidator.validate(model_internal::_instance.firstName)
        model_internal::_firstNameIsValid_der = (valRes.results == null);
        model_internal::_firstNameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::firstNameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::firstNameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get firstNameValidationFailureMessages():Array
    {
        if (model_internal::_firstNameValidationFailureMessages == null)
            model_internal::calculateFirstNameIsValid();

        return _firstNameValidationFailureMessages;
    }

    model_internal function set firstNameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_firstNameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_firstNameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "firstNameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get homePhoneStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get homePhoneValidator() : StyleValidator
    {
        return model_internal::_homePhoneValidator;
    }

    model_internal function set _homePhoneIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_homePhoneIsValid;         
        if (oldValue !== value)
        {
            model_internal::_homePhoneIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "homePhoneIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get homePhoneIsValid():Boolean
    {
        if (!model_internal::_homePhoneIsValidCacheInitialized)
        {
            model_internal::calculateHomePhoneIsValid();
        }

        return model_internal::_homePhoneIsValid;
    }

    model_internal function calculateHomePhoneIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_homePhoneValidator.validate(model_internal::_instance.homePhone)
        model_internal::_homePhoneIsValid_der = (valRes.results == null);
        model_internal::_homePhoneIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::homePhoneValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::homePhoneValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get homePhoneValidationFailureMessages():Array
    {
        if (model_internal::_homePhoneValidationFailureMessages == null)
            model_internal::calculateHomePhoneIsValid();

        return _homePhoneValidationFailureMessages;
    }

    model_internal function set homePhoneValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_homePhoneValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_homePhoneValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "homePhoneValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get lastNameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get lastNameValidator() : StyleValidator
    {
        return model_internal::_lastNameValidator;
    }

    model_internal function set _lastNameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_lastNameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_lastNameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "lastNameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get lastNameIsValid():Boolean
    {
        if (!model_internal::_lastNameIsValidCacheInitialized)
        {
            model_internal::calculateLastNameIsValid();
        }

        return model_internal::_lastNameIsValid;
    }

    model_internal function calculateLastNameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_lastNameValidator.validate(model_internal::_instance.lastName)
        model_internal::_lastNameIsValid_der = (valRes.results == null);
        model_internal::_lastNameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::lastNameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::lastNameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get lastNameValidationFailureMessages():Array
    {
        if (model_internal::_lastNameValidationFailureMessages == null)
            model_internal::calculateLastNameIsValid();

        return _lastNameValidationFailureMessages;
    }

    model_internal function set lastNameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_lastNameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_lastNameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "lastNameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get middleNameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get middleNameValidator() : StyleValidator
    {
        return model_internal::_middleNameValidator;
    }

    model_internal function set _middleNameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_middleNameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_middleNameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "middleNameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get middleNameIsValid():Boolean
    {
        if (!model_internal::_middleNameIsValidCacheInitialized)
        {
            model_internal::calculateMiddleNameIsValid();
        }

        return model_internal::_middleNameIsValid;
    }

    model_internal function calculateMiddleNameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_middleNameValidator.validate(model_internal::_instance.middleName)
        model_internal::_middleNameIsValid_der = (valRes.results == null);
        model_internal::_middleNameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::middleNameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::middleNameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get middleNameValidationFailureMessages():Array
    {
        if (model_internal::_middleNameValidationFailureMessages == null)
            model_internal::calculateMiddleNameIsValid();

        return _middleNameValidationFailureMessages;
    }

    model_internal function set middleNameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_middleNameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_middleNameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "middleNameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get passwordStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get passwordValidator() : StyleValidator
    {
        return model_internal::_passwordValidator;
    }

    model_internal function set _passwordIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_passwordIsValid;         
        if (oldValue !== value)
        {
            model_internal::_passwordIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "passwordIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get passwordIsValid():Boolean
    {
        if (!model_internal::_passwordIsValidCacheInitialized)
        {
            model_internal::calculatePasswordIsValid();
        }

        return model_internal::_passwordIsValid;
    }

    model_internal function calculatePasswordIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_passwordValidator.validate(model_internal::_instance.password)
        model_internal::_passwordIsValid_der = (valRes.results == null);
        model_internal::_passwordIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::passwordValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::passwordValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get passwordValidationFailureMessages():Array
    {
        if (model_internal::_passwordValidationFailureMessages == null)
            model_internal::calculatePasswordIsValid();

        return _passwordValidationFailureMessages;
    }

    model_internal function set passwordValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_passwordValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_passwordValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "passwordValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get personalInfoStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get personalInfoValidator() : StyleValidator
    {
        return model_internal::_personalInfoValidator;
    }

    model_internal function set _personalInfoIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_personalInfoIsValid;         
        if (oldValue !== value)
        {
            model_internal::_personalInfoIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "personalInfoIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get personalInfoIsValid():Boolean
    {
        if (!model_internal::_personalInfoIsValidCacheInitialized)
        {
            model_internal::calculatePersonalInfoIsValid();
        }

        return model_internal::_personalInfoIsValid;
    }

    model_internal function calculatePersonalInfoIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_personalInfoValidator.validate(model_internal::_instance.personalInfo)
        model_internal::_personalInfoIsValid_der = (valRes.results == null);
        model_internal::_personalInfoIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::personalInfoValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::personalInfoValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get personalInfoValidationFailureMessages():Array
    {
        if (model_internal::_personalInfoValidationFailureMessages == null)
            model_internal::calculatePersonalInfoIsValid();

        return _personalInfoValidationFailureMessages;
    }

    model_internal function set personalInfoValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_personalInfoValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_personalInfoValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "personalInfoValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get sexStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get sexValidator() : StyleValidator
    {
        return model_internal::_sexValidator;
    }

    model_internal function set _sexIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_sexIsValid;         
        if (oldValue !== value)
        {
            model_internal::_sexIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sexIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get sexIsValid():Boolean
    {
        if (!model_internal::_sexIsValidCacheInitialized)
        {
            model_internal::calculateSexIsValid();
        }

        return model_internal::_sexIsValid;
    }

    model_internal function calculateSexIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_sexValidator.validate(model_internal::_instance.sex)
        model_internal::_sexIsValid_der = (valRes.results == null);
        model_internal::_sexIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::sexValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::sexValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get sexValidationFailureMessages():Array
    {
        if (model_internal::_sexValidationFailureMessages == null)
            model_internal::calculateSexIsValid();

        return _sexValidationFailureMessages;
    }

    model_internal function set sexValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_sexValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_sexValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sexValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get ssnStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get ssnValidator() : StyleValidator
    {
        return model_internal::_ssnValidator;
    }

    model_internal function set _ssnIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_ssnIsValid;         
        if (oldValue !== value)
        {
            model_internal::_ssnIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "ssnIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get ssnIsValid():Boolean
    {
        if (!model_internal::_ssnIsValidCacheInitialized)
        {
            model_internal::calculateSsnIsValid();
        }

        return model_internal::_ssnIsValid;
    }

    model_internal function calculateSsnIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_ssnValidator.validate(model_internal::_instance.ssn)
        model_internal::_ssnIsValid_der = (valRes.results == null);
        model_internal::_ssnIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::ssnValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::ssnValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get ssnValidationFailureMessages():Array
    {
        if (model_internal::_ssnValidationFailureMessages == null)
            model_internal::calculateSsnIsValid();

        return _ssnValidationFailureMessages;
    }

    model_internal function set ssnValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_ssnValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_ssnValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "ssnValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get stateStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get stateValidator() : StyleValidator
    {
        return model_internal::_stateValidator;
    }

    model_internal function set _stateIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_stateIsValid;         
        if (oldValue !== value)
        {
            model_internal::_stateIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "stateIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get stateIsValid():Boolean
    {
        if (!model_internal::_stateIsValidCacheInitialized)
        {
            model_internal::calculateStateIsValid();
        }

        return model_internal::_stateIsValid;
    }

    model_internal function calculateStateIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_stateValidator.validate(model_internal::_instance.state)
        model_internal::_stateIsValid_der = (valRes.results == null);
        model_internal::_stateIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::stateValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::stateValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get stateValidationFailureMessages():Array
    {
        if (model_internal::_stateValidationFailureMessages == null)
            model_internal::calculateStateIsValid();

        return _stateValidationFailureMessages;
    }

    model_internal function set stateValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_stateValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_stateValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "stateValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get usernameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get usernameValidator() : StyleValidator
    {
        return model_internal::_usernameValidator;
    }

    model_internal function set _usernameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_usernameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_usernameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "usernameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get usernameIsValid():Boolean
    {
        if (!model_internal::_usernameIsValidCacheInitialized)
        {
            model_internal::calculateUsernameIsValid();
        }

        return model_internal::_usernameIsValid;
    }

    model_internal function calculateUsernameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_usernameValidator.validate(model_internal::_instance.username)
        model_internal::_usernameIsValid_der = (valRes.results == null);
        model_internal::_usernameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::usernameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::usernameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get usernameValidationFailureMessages():Array
    {
        if (model_internal::_usernameValidationFailureMessages == null)
            model_internal::calculateUsernameIsValid();

        return _usernameValidationFailureMessages;
    }

    model_internal function set usernameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_usernameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_usernameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "usernameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get workPhoneStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get workPhoneValidator() : StyleValidator
    {
        return model_internal::_workPhoneValidator;
    }

    model_internal function set _workPhoneIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_workPhoneIsValid;         
        if (oldValue !== value)
        {
            model_internal::_workPhoneIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "workPhoneIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get workPhoneIsValid():Boolean
    {
        if (!model_internal::_workPhoneIsValidCacheInitialized)
        {
            model_internal::calculateWorkPhoneIsValid();
        }

        return model_internal::_workPhoneIsValid;
    }

    model_internal function calculateWorkPhoneIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_workPhoneValidator.validate(model_internal::_instance.workPhone)
        model_internal::_workPhoneIsValid_der = (valRes.results == null);
        model_internal::_workPhoneIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::workPhoneValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::workPhoneValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get workPhoneValidationFailureMessages():Array
    {
        if (model_internal::_workPhoneValidationFailureMessages == null)
            model_internal::calculateWorkPhoneIsValid();

        return _workPhoneValidationFailureMessages;
    }

    model_internal function set workPhoneValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_workPhoneValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_workPhoneValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "workPhoneValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get zipStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }


     /**
     * 
     * @inheritDoc 
     */ 
     override public function getStyle(propertyName:String):com.adobe.fiber.styles.IStyle
     {
         switch(propertyName)
         {
            default:
            {
                return null;
            }
         }
     }
     
     /**
     * 
     * @inheritDoc 
     *  
     */  
     override public function getPropertyValidationFailureMessages(propertyName:String):Array
     {
         switch(propertyName)
         {
            case("addressLine1"):
            {
                return addressLine1ValidationFailureMessages;
            }
            case("addressLine2"):
            {
                return addressLine2ValidationFailureMessages;
            }
            case("birthCountry"):
            {
                return birthCountryValidationFailureMessages;
            }
            case("city"):
            {
                return cityValidationFailureMessages;
            }
            case("dateOfBirth"):
            {
                return dateOfBirthValidationFailureMessages;
            }
            case("email"):
            {
                return emailValidationFailureMessages;
            }
            case("ethnicity"):
            {
                return ethnicityValidationFailureMessages;
            }
            case("firstName"):
            {
                return firstNameValidationFailureMessages;
            }
            case("homePhone"):
            {
                return homePhoneValidationFailureMessages;
            }
            case("lastName"):
            {
                return lastNameValidationFailureMessages;
            }
            case("middleName"):
            {
                return middleNameValidationFailureMessages;
            }
            case("password"):
            {
                return passwordValidationFailureMessages;
            }
            case("personalInfo"):
            {
                return personalInfoValidationFailureMessages;
            }
            case("sex"):
            {
                return sexValidationFailureMessages;
            }
            case("ssn"):
            {
                return ssnValidationFailureMessages;
            }
            case("state"):
            {
                return stateValidationFailureMessages;
            }
            case("username"):
            {
                return usernameValidationFailureMessages;
            }
            case("workPhone"):
            {
                return workPhoneValidationFailureMessages;
            }
            default:
            {
                return emptyArray;
            }
         }
     }

}

}
